package gemini.castor.ui.client.page.content.information.stepbystep.form;

import gemini.castor.ui.client.constants.I18nConstants;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiTemplate;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.Widget;

public class StepByStepFormView extends Composite implements
		StepByStepFormPresenter.Display {

	@UiTemplate("StepByStepFormView.ui.xml")
	interface MyUiBinder extends UiBinder<Panel, StepByStepFormView> {
	}

	private static final MyUiBinder binder = GWT.create(MyUiBinder.class);
	private I18nConstants constants;

	public StepByStepFormView() {
		initWidget(binder.createAndBindUi(this));
		constants = GWT.create(I18nConstants.class);
	}

	@UiField
	Image imgUseWearTalk;

	@UiField
	Image imgFirst72Hours;

	@UiField
	HTML htmFirst72HoursInfo;

	@UiField
	HTML htmUseWearTalkInfo;

	@Override
	public Widget asWidget() {
		return this;
	}

	@Override
	public void loadData() {
		imgUseWearTalk
				.setUrl("images/logo/Business_use_the_Product_109x109.jpg");
		imgUseWearTalk.setSize("98px", "98px");
		imgFirst72Hours
		.setUrl("images/logo/First72Hours_109x109.jpg");
		imgFirst72Hours.setSize("98px", "98px");
		htmFirst72HoursInfo.setHTML(constants.htmFirst72HoursInfo());
		htmUseWearTalkInfo.setHTML(constants.htmUseWearTalkInfo());
	}

}
